package me.fung.wubi.app.view.build_table.select

import androidx.compose.runtime.getValue
import androidx.compose.runtime.mutableStateOf
import androidx.compose.runtime.setValue
import me.fung.keen.app.view.Presenter
import me.fung.wubi.app.component.swing.chooseFile
import me.fung.wubi.base.io.localObject


data class SelectFileModel(
    val file: String = "",
)

class SelectFileDialogPresenter : Presenter() {
    var data: SelectFileModel by mutableStateOf(SelectFileModel())
    fun chooseFile() {
        chooseFile(localObject.path())?.also {
            data = SelectFileModel(it)
        }
    }

}